﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using dotnethost.Models;

namespace dotnethost.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to Simple E-Shop!";

            Entities db = new Entities();
            Product product = new Product();
            product.Price = 9.99M;
            product.ProductName = "TopCD";
            db.Products.AddObject(product);
            db.SaveChanges();

            return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
